package org.deng.learn.basic.extendslearn;

/**
 * @author DengLibin
 * @Description
 * @Date 2018/12/6 0006 15:54
 */
public class Son extends Father{
    static {
        System.out.println("子类静态代码块1");
    }
    private static int age = 10;
    static {
        System.out.println("子类静态代码块2 age="+age);
    }

    private  String name = "小兵";
    {
        System.out.println("子类构造代码块2:name="+name);
    }

    public  Son(){
        System.out.println("子类构造函数");
        show();
    }
    public   void show(){
        System.out.println(this.getClass().getName());
        System.out.println("子类name = "+name);
    }
}
